package Proxy;
import java.io.*;
import java.net.*;

public class Server {
private ServerSocket serverSocket;

    @SuppressWarnings("CallToThreadStartDuringObjectConstruction")
    public Server(int inPort){
        try {
            serverSocket = new ServerSocket(inPort,1);

            while(true){
                Socket clientSocket = serverSocket.accept();
                Thread t = new Thread(new Proxy(clientSocket));
                t.start();
            }
        } 
        catch (IOException e) {
            e.printStackTrace();
        } 
    }
}
